﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using SoucreGame.DTO;

namespace SoucreGame.BUS.CBusiTower
{
    class CBusiThapPhongThu:CBusiNhanVat
    {
        public CBusiThapPhongThu(ContentManager conten,GameTime gameTime,SpriteBatch sp):base(conten,gameTime,sp)
        {
            this.NhanVat =new CInfoTruPhongThu(conten, null,sp);
            LoadDuLieu();
        }
        private void LoadDuLieu()
        {
            this.NhanVat.Ten = NhanVat.Ten;
            this.NhanVat.Mau = NhanVat.Mau;
            this.NhanVat.TocDoTanCong = NhanVat.TocDoTanCong;
            this.NhanVat.ToaDoHienTai = NhanVat.ToaDoHienTai;
            this.NhanVat.PhamViTC = NhanVat.PhamViTC;
            this.NhanVat.SucTanCong = NhanVat.SucTanCong;
            this.NhanVat.SucPhongThu = NhanVat.SucPhongThu;
            this.NhanVat.TrangThai = NhanVat.TrangThai;
            this.NhanVat.SttAnhBatDau = NhanVat.SttAnhBatDau;
            this.NhanVat.SoLuongAnhChet = NhanVat.SoLuongAnhChet;
            this.NhanVat.SoLuongAnhTanCong = NhanVat.SoLuongAnhTanCong;
            this.NhanVat.SoLuongAnhDungYen = NhanVat.SoLuongAnhDungYen;
            this.thoiGianChet = 150;
            if (this.Content != null)
            {
                this.NhanVat.AnhNhanVat = NhanVat.AnhNhanVat;
                this.NhanVat.ViTriAnh = NhanVat.ViTriAnh;
            }

        }
        public override void Update(GameTime gameTime)
        {
            Hanhdong = chon.chet;
            base.Update(gameTime);
        }
        public override void Draw(GameTime gameTime)
        {
            Hanhdong = chon.chet;
            base.Draw(gameTime);
        }
    }
}
